#define _CRT_SECURE_NO_WARNINGS 1
#include <cmath>
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include<math.h>
#include<stdlib.h>
#include<stdio.h>
#include<unordered_map>
using namespace std;

class Solution {
public:
    int getNum(int left, int right)
    {
        return (rand() % (right - left + 1)) + left;
    }

    void sort(int left, int right, vector<int>& nums)
    {
        if (left >= right) return;
        int l = left - 1, r = right;
        int key = nums[getNum(left, right - 1)];
        int i = left;
        while (i < r)
        {
            if (nums[i] < key) swap(nums[++l], nums[i++]);
            else if (nums[i] == key) i++;
            else swap(nums[--r], nums[i]);
        }
        sort(left, l + 1, nums);
        sort(r, right, nums);
    }

    vector<int> sortArray(vector<int>& nums) {
        srand(time(0));
        sort(0, nums.size(), nums);
        return nums;
    }
};

int main() {
    return 0;
}